#ifndef __SENSITIVE_FILTER_H__
#define __SENSITIVE_FILTER_H__

#include <string>
#include <forward_list>

namespace Utils
{
    struct SensitiveNode;

    class SensitiveFilter
    {
    private:
        SensitiveNode *root = nullptr;
        void buildNodeTree();
        void freeNode(SensitiveNode *node);
        SensitiveNode *nodeHasExist(SensitiveNode *node, char data);

    public:
        SensitiveFilter();
        ~SensitiveFilter();

        void loadTextData(const std::string &text);
        void loadFile(const std::string &path);
        bool filterContent(std::string &content);
    };
}

#endif
